package cn.line5.seam.util;

import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * <h1>资源文件工具类</h1>
 * 
 * @author Liu,Xiaojun
 * @since JDK1.6
 */
public class ResourceConfig {
	private ResourceBundle rb;

	public ResourceConfig(String resourceName) {
		rb = ResourceBundle.getBundle(resourceName, Locale.getDefault());
	}

	public String getString(String key) {
		try {
			return rb.getString(key);
		} catch (MissingResourceException ex) {
			return "";
		}
	}

}